package com.gxuwz.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gxuwz.business.service.ISysUserRoleService;
import com.gxuwz.business.dao.impl.SysUserRoleDAO;
import com.gxuwz.business.entity.SysUserRole;



@Service("sysUserRoleService")
public class SysUserRoleServiceImpl implements ISysUserRoleService {

	
	
	@Autowired
	private SysUserRoleDAO sysUserRoleDAO;
	
	
/*
 * 添加用户角色
 * @see com.gxuwz.OLReporting.business.service.ISysUserRoleService#addUserRole(com.gxuwz.OLReporting.business.entity.UserRole)
 */
	@Override
	public void addUserRole(SysUserRole sysUserRole) {
		// TODO Auto-generated method stub
		sysUserRoleDAO.save(sysUserRole);
	}


	@Override
	public List<SysUserRole> findById(String userId) {
		// TODO Auto-generated method stub
		return sysUserRoleDAO.findById(userId);
	}

/*
 * 删除用户角色
 */
	@Override
	public void deleteUserRole(String userId) {
		// TODO Auto-generated method stub
		sysUserRoleDAO.delteById(userId);
	}


	@Override
	public List<SysUserRole> findByRoleId(String roleId) {
		return sysUserRoleDAO.findByRoleId(roleId);
	}
}
